package com.jan.activemq01.test;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import com.jan.activemq01.service.QueueReceiver;
import com.jan.activemq01.service.QueueSender;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations="classpath:applicationContext.xml")
public class SpringJms {
	@Value("${queueName}")
	private String queueName;
	@Autowired
	private QueueSender queueSender;
	@Autowired
	private QueueReceiver receiver;
	@Test
	public void send1(){
		queueSender.sendMessage();
	}
	@Test
	public void receive1(){
		receiver.receive();
	}
}
